package top.huntwolf.admin.dao;


import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
import top.huntwolf.admin.pojo.topical.Topical;
import top.huntwolf.admin.pojo.topical.TopicalBook;
import top.huntwolf.admin.pojo.topical.TopicalBookList;

import java.util.List;
import java.util.Map;

@Mapper
@Repository
public interface TopicalDao {
    void add(Topical topical);

    void update(Topical topical);

    void delete(Integer tid);

    List<TopicalBook> getByTopical();

    Map<String, List<TopicalBook>> getBySelectedList();

    List<TopicalBook> getHot();


    // 获取专题名字
    List<TopicalBookList> getTopicalName();


    // 根据专题名字获取列表
    List<TopicalBook> getTopicalByName(String name);

    // 获取精选清单名字
    List<TopicalBookList> getBySelectedListNames();


    // 根据精选清单名字获取书籍
    List<TopicalBook> getBySelectedListByName(String name);
}
